package com.zmy.seursstarter;

import com.zmy.seursstarter.HttpTool.HttpClientUtil;
import com.zmy.seursstarter.core.SeuAuth;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableConfigurationProperties({SeuRSProperties.class})
public class SeuRSAutoConfig {
    @Bean
    @ConditionalOnMissingBean
    public SeuAuth SeuAuth() {
        System.out.println("[Seu-RS-Starter]SeuAuth类自动装配完成!");
        return new SeuAuth();
    }

    @Bean
    @ConditionalOnMissingBean
    public HttpClientUtil HttpClientUtil() {
        System.out.println("[Seu-RS-Starter]HttpClientUtil类自动装配完成!");
        return new HttpClientUtil();
    }
}
